package com.morningstar.common.exception;

import com.morningstar.common.result.ResultCode;
import lombok.Getter;

/**
 * @author yls
 */
@Getter
public class ApiException extends RuntimeException{
    /**
     *
     */
    private String requestJson;

    /**
     *
     */
    private ResultCode resultCode;

    /**
     * Constructs a new runtime exception with the specified detail message.
     * The cause is not initialized, and may subsequently be initialized by a
     * call to {@link #initCause}.
     *
     * @param message the detail message. The detail message is saved for
     *                later retrieval by the {@link #getMessage()} method.
     */
    public ApiException(String message, String requestJson, ResultCode resultCode) {
        super(message);
        this.requestJson = requestJson;
        this.resultCode = resultCode;
    }
}
